* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
.header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.header-left {
    flex: 1;
}

.site-title {
    font-size: 24px;
    font-weight: bold;
    color: #1a73e8;
    margin-bottom: 5px;
}

.site-subtitle {
    font-size: 14px;
    color: #666;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
}

.user-nickname {
    font-size: 14px;
    color: #333;
}

button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-login {
    background: #1a73e8;
    color: #fff;
}

.btn-login:hover {
    background: #1557b0;
}

.btn-logout, .btn-setting {
    background: #f5f5f5;
    color: #333;
}

.btn-logout:hover, .btn-setting:hover {
    background: #e0e0e0;
}

/* 主体内容 */
.main {
    padding: 20px 0;
}

/* 搜索框 */
.search-box {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.search-box button {
    background: #1a73e8;
    color: #fff;
}

.search-box button:last-child {
    background: #f5f5f5;
    color: #333;
}

/* 发布框 */
.publish-box {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.publish-box textarea {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
    font-family: inherit;
}

.publish-counter {
    text-align: right;
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.publish-tools {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.tool-btn {
    padding: 8px 12px;
    background: #f5f5f5;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.tool-btn:hover {
    background: #e0e0e0;
}

.preview-files {
    margin: 15px 0;
}

.preview-item {
    display: inline-block;
    margin: 5px;
    position: relative;
}

.preview-item img {
    max-width: 100px;
    max-height: 100px;
    border-radius: 4px;
}

.preview-item .remove-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: #f44336;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
}

.btn-publish {
    background: #1a73e8;
    color: #fff;
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

.btn-publish:hover {
    background: #1557b0;
}

/* 微博列表 */
.wlog-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.wlog-item {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.wlog-item.is-top {
    border: 2px solid #ff9800;
    position: relative;
}

.wlog-item.is-top::before {
    content: '置顶';
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff9800;
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.wlog-content {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 10px;
    word-wrap: break-word;
}

.wlog-content a {
    color: #1a73e8;
    text-decoration: none;
}

.wlog-files {
    margin: 15px 0;
}

.file-grid {
    display: grid;
    gap: 5px;
}

.file-grid.count-1 {
    grid-template-columns: 1fr;
}

.file-grid.count-2, .file-grid.count-4 {
    grid-template-columns: repeat(2, 1fr);
}

.file-grid.count-3, .file-grid.count-5, .file-grid.count-6, .file-grid.count-7, .file-grid.count-8, .file-grid.count-9 {
    grid-template-columns: repeat(3, 1fr);
}

.file-item {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
}

.file-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.file-item.video::after, .file-item.audio::after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.file-download {
    padding: 10px;
    background: #f5f5f5;
    border-radius: 4px;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.file-download:hover {
    background: #e0e0e0;
}

.wlog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #999;
    font-size: 14px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.wlog-actions {
    display: flex;
    gap: 10px;
}

.wlog-actions button {
    padding: 5px 10px;
    background: #f5f5f5;
    color: #666;
    font-size: 12px;
}

.wlog-actions button:hover {
    background: #e0e0e0;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.pagination button, .pagination select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination button.active {
    background: #1a73e8;
    color: #fff;
    border-color: #1a73e8;
}

/* 遮罩层 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s;
    padding: 20px;
}

.modal.show {
    opacity: 1;
}

.modal-content {
  min-height:100px;
    background: #fff;
    border-radius: 8px;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    z-index: 1;
}

.modal-body {
    overflow-y: auto;
    max-height: 90vh;
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    padding: 12px 24px;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-success {
    background: #4caf50;
}

.toast-error {
    background: #f44336;
}

.toast-warning {
    background: #ff9800;
}

/* 响应式 */
@media (max-width: 600px) {
    .site-title {
        font-size: 20px;
    }
    
    .user-nickname {
        display: none;
    }
    
    .header-right {
        gap: 5px;
    }
    
    .header-right button {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .user-avatar {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}